﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace telefonia
{
    public partial class MainWindos : Form
    {
        public MainWindos()
        {
            InitializeComponent();
        }
        private void callForms(Form form)
        {
            if (this.MdiChildren.Length > 0)
                this.MdiChildren[0].Close();
            form.MdiParent = this;
            form.Show();
        }
        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ClientsView cli = new ClientsView();
            callForms(cli);
        }

        private void MainWindos_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'tELEFONIADataSet.Cliente' table. You can move, or remove it, as needed.


        }

        private void todoLosClientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Cliente cli = new Cliente();
            callForms(cli);
        }

        private void celularesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CelularesView celu = new CelularesView();
            callForms(celu);
        }

        private void agregarCelularToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddCelular celu = new AddCelular();
            callForms(celu);
        }

        private void reclamosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReclamosView rel = new ReclamosView();
            callForms(rel);
        }

        private void agregarReclamoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddReclamo recl = new AddReclamo();
            callForms(recl);
        }

        private void reportesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Reportes report = new Reportes();
            callForms(report);
        }

        private void promocionPorFidelidadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Fidelidad fi = new Fidelidad();
            callForms(fi);
        }

        private void promocionLlamadasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Promocion promo = new Promocion();
            callForms(promo);
        }
    }
}
